﻿namespace WeWork.Model
{
    /// <summary>
    /// 文件
    /// </summary>
    public class ChatFile : MsgChatRoomBase
    {
        /*
        {
            "msgid":"18039699423706571225_1603875608",
            "action":"send",
            "from":"kens",
            "tolist":["wmErxtDgAArDlFIhf76O6w4GxU81al8w"],
            "roomid":"",
            "msgtime":1603875608214,
            "msgtype":"file",
            "file":{
                "md5sum":"18e93fc2ea884df23b3d2d3b8667b9f0",
                "filename":"资料.docx",
                "fileext":"docx",
                "filesize":18181,
                "sdkfileid":"E4ODRkZjIzYjNkMmQzYjg2NjdiOWYwMDIwMTA1MDIwMTAwMDQwMBI4TkRkZk1UWTRPRGcxTURrek9UZzBPVEF6TTE4eE1EUXpOVGcxTlRVNVh6RTJNRE00TnpVMk1EZz0aIDMwMzkzMzY0NjEzNjM3NjY2NDY1NjMzNjYxMzIzNzYx"
            }
        }
        */
        /// <summary>
        /// 消息内容
        /// </summary>
        public FileInfo file { set; get; }
    }

    public class FileInfo
    {
        /// <summary>
        /// 资源的md5值，供进行校验。String类型
        /// </summary>
        public string md5sum { set; get; }
        /// <summary>
        /// 文件名称。String类型
        /// </summary>
        public string filename { set; get; }
        /// <summary>
        /// 文件类型后缀。String类型
        /// </summary>
        public string fileext { set; get; }
        /// <summary>
        /// 文件大小。Uint32类型
        /// </summary>
        public int filesize { set; get; }
        /// <summary>
        /// 媒体资源的id信息。String类型
        /// </summary>
        public string sdkfileid { set; get; }
    }
}
